package com.hyt.it.ogt.ykcj.feign.kw;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.hyt.it.ogt.ykcj.feign.model.ResultListEntity;
import com.hyt.it.ogt.ykcj.feign.model.TaskCandidateAreaVO;
import com.hyt.loginfo.config.OAuth2FeignRequestConfig;

/**
 * description 远程调用获取区域信息类
 *
 * @author yaojian
 * @createTime 2021/12/06
 */
@FeignClient(value = "it-ogt-kq", fallback = AreaClientHystrix.class, configuration = OAuth2FeignRequestConfig.class)
public interface AreaClient {

    /**
     * 根据考试任务id获取当前考试任务下的省份
     *
     * @param taskId
     * @return
     */
    @RequestMapping(value = "/api/cj/get/getCandidateProvinceByTaskId", method = RequestMethod.GET)
    ResultListEntity<TaskCandidateAreaVO> getCandidateProvinceByTaskId(@RequestParam("taskId") String taskId);

    /**
     * 根据考试任务id和省份id获取当前考试任务下的区域
     *
     * @param taskId
     * @param province
     * @return
     */
    @RequestMapping(value = "/api/cj/get/getCandidateCityById", method = RequestMethod.GET)
    ResultListEntity<TaskCandidateAreaVO> getCandidateCityById(@RequestParam("taskId") String taskId, @RequestParam("province") String province);

}
